<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-4-1
 * Time: 17:35
 */
namespace Study;

class Test{
    private $abc = '';
    private $bca = '';

    public function __set($var, $val)
    {
        $this->$var = $val;
    }
    public function __get($var){
        return $this->$var;
    }
}
$test = new Test();
$test->abc = 'abcc';
var_dump($test->abc);

